"user strict";

const fs = require('fs');
const path = require('path');
const config = require('./config');
const companyNotice = require('./companyNotice');
const companyInfo = require('./companyInfo');

//下载根目录
config.basePath = path.join(__dirname, 'download_file');
fs.exists(config.basePath, exists => {
    if (!exists) {
        fs.mkdirSync(config.basePath);
    }
});

// companyInfo.requestInfo('I65', '广西省', info => {
//     if (!info) {
//         return;
//     }
//     for (let i = 0; i < info.length; i++) {
//         let companyObj = info[i];
//         companyNotice.downloadNoticeDoc(companyObj.xxzqdm);
//     }
// });
companyNotice.downloadNoticeDoc('831266');